<%@ page import="com.luojiaoj.subject.Subject" %>
<!doctype html>
<html>
	<head>
        <r:require modules="subject" />
		<meta name="layout" content="OJMain">
		<title><g:message code="ljoj.onlinejudge.subject.list.label" /></title>
	</head>
	<body>
    <div id="contain" class="clearfix">
        <div class="homeHeader" id="overview">
            <div class="container">

		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="list-subject" class="content scaffold-list" role="main">
			<h1><g:message code="ljoj.onlinejudge.subject.list.label" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table class="table">
				<thead>
					<tr>

                        <g:sortableColumn property="id" title="${message(code: 'ljoj.onlinejudge.subject.id.label', default: 'id')}" />

						<g:sortableColumn property="title" title="${message(code: 'ljoj.onlinejudge.subject.title.label', default: 'Title')}" />

					</tr>
				</thead>
				<tbody>
				<g:each in="${subjectInstanceList}" status="i" var="subjectInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
                        <td><g:link action="show" id="${subjectInstance.id}">${fieldValue(bean: subjectInstance, field: "id")}</g:link></td>
					
						<td><g:link action="show" id="${subjectInstance.id}">${fieldValue(bean: subjectInstance, field: "title")}</g:link></td>

					</tr>
				</g:each>
				</tbody>
			</table>
			<div class="pagination">
				<g:paginate total="${subjectInstanceTotal}" />
			</div>
            <div class="btn btn-primary">
                <a class="white" href="${createLink(controller: 'subject', action: 'create')}">
                    <g:message code="ljoj.onlinejudge.subject.add.label" default="add subject" />
                </a>
            </div>
		</div>


            </div>
        </div>
    </div>
	</body>
</html>
